<?php

require_once 'db_conn.php';
header("constant-type:text/html;charset=utf-8");

$username = $_POST['username'];
$password = $_POST['password'];
$login_time = time();

$sql = "
INSERT INTO user (
id ,
account ,
password ,
login_time
)
VALUES (
	NULL , '$username', '$password', '$login_time'
);
";

$result = $conn->query($sql);
if($result === false ){
	echo "数据库操作失败! ! ! :(";
}else {
	echo "注册成功! ";
	heaser("Location:register_1.html");
}
        

